home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 101 / CD-ROM 101.iso / compl / maya5ple / Install_MayaPLE5_English.exe / Maya / Data1.cab / doHelpMenuItems.mel < prev    next >
Encoding:
Text File  |  2003-07-17  |  9.0 KB  |  249 lines

  1. // Copyright (C) 1997-2002 Alias|Wavefront,
  2. // a division of Silicon Graphics Limited.
  3. //
  4. // The information in this file is provided for the exclusive use of the
  5. // licensees of Alias|Wavefront.  Such users have the right to use, modify,
  6. // and incorporate this code into other products for purposes authorized
  7. // by the Alias|Wavefront license agreement, without fee.
  8. //
  9. // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  10. // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  11. // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  12. // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  13. // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  14. // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  15. // PERFORMANCE OF THIS SOFTWARE.
  16. //
  17. // Copyright (C) 1997-2002 Alias|Wavefront,
  18. // a division of Silicon Graphics Limited.
  19. //
  20. // The information in this file is provided for the exclusive use of the
  21. // licensees of Alias|Wavefront.  Such users have the right to use, modify,
  22. // and incorporate this code into other products for purposes authorized
  23. // by the Alias|Wavefront license agreement, without fee.
  24. //
  25. // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  26. // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  27. // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  28. // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  29. // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  30. // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  31. // PERFORMANCE OF THIS SOFTWARE.
  32. //
  33. //
  34. //  Alias|Wavefront Script File
  35. //  MODIFY THIS AT YOUR OWN RISK
  36. //
  37. //  Creation Date:  Nov 25 1998
  38. // 
  39. //  Description:
  40. //      This procedure creates the help menu items.
  41. //
  42. //    Arguments:
  43. //        $object - is the name of the panel or window.
  44. //        $menuParent - is the parent window.
  45. //
  46.  
  47.  
  48. global proc setPopUpHelpMode ( int $newMode)
  49. //
  50. //    Description:
  51. //        Simply set the state of the pop up help mode and
  52. //         store in an optionVar for preference persistancy.
  53. //
  54. {
  55.     help -popupMode $newMode;
  56.     optionVar -iv popUpHelpMode $newMode;
  57. }
  58.  
  59. global proc setHelpMenuState ( string $menu )
  60. //
  61. //    Description simply set the state of this popup menu
  62. //
  63. {
  64.     int $state = `help -q -popupMode`;
  65.     menuItem -e -checkBox $state ($menu + "|popUpHelpState");
  66. }
  67.  
  68. global proc doHelpMenuItems (string $object, string $menuParent) 
  69. {
  70.     global string $gMainHelpMenu;
  71.  
  72.     int $numOfMenuItemsBefore;
  73.     int $numOfMenuItemsAfter;
  74.  
  75.     menuItem -label "Contents and Search..." 
  76.         -annotation "Contents and Search: Opens the online help in a browser"
  77.         -image "menuIconHelp.xpm"
  78.         -enableCommandRepeat false
  79.         -command "showHelp DocsHome";
  80.     menuItem -label "Index..." 
  81.         -annotation "Index: Opens the online help index in a browser"
  82.         -image "menuIconHelp.xpm"
  83.         -enableCommandRepeat false
  84.         -command "showHelp DocsIndex";
  85.  
  86.     // Only add to the main window
  87.     //
  88.     if ($menuParent == "MayaWindow") {
  89.         menuItem -divider true; 
  90.         if ( `about -evalVersion` ) {
  91.             menuItem -label "Things You Can Do with Maya..."
  92.                 -annotation "Things You Can Do with Maya: Orientation to Maya"
  93.                     -enableCommandRepeat false
  94.                 -command "showHelp -docs \"overview_of_maya.htm\"";
  95.  
  96.             menuItem -label "Extra Learning Resources..."
  97.                 -annotation "Extra Learning Resources: Books, DVDs, online groups and more"
  98.                     -enableCommandRepeat false
  99.                 -command "showHelp -docs \"LearnMaya.html\"";
  100.         }
  101.  
  102.         if (`about -windows` || `about -mac`) {
  103.             menuItem -label "Learning Movies..."
  104.                 -annotation "Learning Movies: Shows movies demonstrating basic concepts"
  105.                 -image "menuIconHelp.xpm"
  106.                 -enableCommandRepeat false
  107.                 -command "mayaLearningMoviesPage";
  108.         }
  109.  
  110.         menuItem -label "Tutorials..."
  111.             -annotation "Tutorials: Opens the Instant Maya tutorial in an HTML browser"
  112.                 -enableCommandRepeat false
  113.             -command "showHelp -docs \"InstantMaya/index.html\"";
  114.             
  115.         if ( `about -evalVersion` ) {    
  116.             menuItem -label "What's New?"
  117.                 -annotation "What's New: Browse through the new features in this version"
  118.                     -enableCommandRepeat false
  119.                 -command "showHelp -docs \"WhatsNew/index.html\"";    
  120.         }
  121.             
  122.                 // Web links
  123.  
  124.         menuItem -divider true;
  125.  
  126.         if ( `about -evalVersion` ) {
  127.             string $buyMayaCommand = "";
  128.             if (`about -macOS`) {
  129.                 $buyMayaCommand = "showHelp -absolute \"http://www.aliaswavefront.com/cgi-bin/products/info.cgi?SRC=mayaple_m_buy&VER=MPLEA050\"";
  130.             } else if (`about -windows`) {
  131.                 $buyMayaCommand = "showHelp -absolute \"http://www.aliaswavefront.com/cgi-bin/products/info.cgi?SRC=mayaple_m_buy&VER=MPLEW050\"";
  132.             }
  133.             menuItem -label "Buy Maya..."
  134.                 -annotation "Buy Maya: Find out how you can buy Maya from the Alias|Wavefront web site"
  135.                 -enableCommandRepeat false
  136.                 -command $buyMayaCommand;
  137.  
  138.             menuItem -label "Maya Personal Learning Edition on the Web..." 
  139.                 -annotation "Personal Learning Edition on the Web: Opens the Maya Personal Learning Edition web site"
  140.                 -image "menuIconHelp.xpm"
  141.                 -enableCommandRepeat false
  142.                 -command "showHelp -absolute \"http://www.aliaswavefront.com/maya/ple/resource\"";
  143.         }
  144.         else {
  145.             // Maya on the Web
  146.         }
  147.         
  148.         menuItem -label "Maya Support Solutions..." 
  149.             -annotation "Maya Support Solutions: Shows the support options available from Alias|Wavefront"
  150.             -image "menuIconHelp.xpm"
  151.             -enableCommandRepeat false
  152.             -command "showHelp -absolute \"http://www.aliaswavefront.com/maya/support/\"";
  153.  
  154.         if ( `about -evalVersion` ) {
  155.             menuItem -label "Alias on the Web..." 
  156.                 -annotation "Alias on the Web: Opens the Alias web site"
  157.                 -image "menuIconHelp.xpm"
  158.                 -enableCommandRepeat false
  159.                 -command "showHelp -absolute \"http://www.alias.com/\"";
  160.         }
  161.         else {
  162.             menuItem -label "Alias|Wavefront on the Web..." 
  163.                 -annotation "Alias|Wavefront on the Web: Opens the Alias|Wavefront web site"
  164.                 -image "menuIconHelp.xpm"
  165.                 -enableCommandRepeat false
  166.                 -command "showHelp -absolute \"http://www.aliaswavefront.com/en/Home/homepage.html\"";
  167.         }
  168.  
  169.         if ( !`about -evalVersion` ) {
  170.         //    Remove the following two Help Menu Items for PLE
  171.         menuItem -label "Download Bonus Tools from the Web" 
  172.             -annotation "Download Bonus Tools from the Web: Opens the unsupported Bonus Tools web page"
  173.             -image "menuIconHelp.xpm"
  174.             -enableCommandRepeat false
  175.             -command "showHelp -absolute \"http://www.aliaswavefront.com/maya/bonustools\"";
  176.  
  177.         menuItem -label "Report a Problem..." 
  178.             -annotation "Report a Problem: Opens the bug reporting web page"
  179.             -image "menuIconHelp.xpm"
  180.             -enableCommandRepeat false
  181.             -command "showHelp -absolute \"http://aw.aliaswavefront.com/special/submit_a_relbug/cgi/product.cgi?product=Maya\"";
  182.         }
  183.         menuItem -divider true; 
  184.         
  185.         menuItem -label "Find Menu..." 
  186.             -annotation "Find Menu: Finds menu items containing the words you type"
  187.             -image "menuIconHelp.xpm"
  188.             -enableCommandRepeat false
  189.             -command "findMenuItem";
  190.             
  191.         menuItem -label "Popup Help"
  192.             -annotation "Popup Help: Toggles the captioned \"tips\" that display in Maya"
  193.             -image "menuIconHelp.xpm"
  194.             -enable true
  195.             -checkBox (`optionVar -q popUpHelpMode`)
  196.             -enableCommandRepeat false
  197.             -command "setPopUpHelpMode #1"
  198.             popUpHelpState;
  199.     }
  200.  
  201.  
  202.     //    Context sensitive menu Items relative to each window.
  203.     //
  204.     menuItem -divider true; 
  205.     $numOfMenuItemsBefore = `menu -query -numberOfItems HelpMenu`;
  206.     doContextHelpProc $object $menuParent;
  207.     $numOfMenuItemsAfter = `menu -query -numberOfItems HelpMenu`;
  208.  
  209.     if ($numOfMenuItemsBefore != $numOfMenuItemsAfter)
  210.     {
  211.         menuItem -divider true; 
  212.     }
  213.  
  214.     menuItem -label "MEL Command Reference..."
  215.         -annotation "MEL Command Reference: Opens the MEL command listing in an HTML browser"
  216.         -image "menuIconHelp.xpm"
  217.         -enableCommandRepeat false
  218.         -command "showHelp DocsMelCommands";
  219.  
  220.     menuItem -label "Node and Attribute Reference..."
  221.         -annotation "Node and Attribute Reference: Opens the node and attribute listing in an HTML browser"
  222.         -image "menuIconHelp.xpm"
  223.         -enableCommandRepeat false
  224.         -command "showHelp DocsNodes";
  225.  
  226.     menuItem -divider true;
  227.     menuItem -label "If Help isn't working..."
  228.             -annotation "Troubleshooting the Help Server: Opens the Help Server Troubleshooting Information in an HTML browser"
  229.                 -enableCommandRepeat false
  230.             -command "showHelp -r \"troubleshooting.html\"";
  231.     
  232.     // Only add to the main window
  233.     if (!`about -mac` && ($menuParent == "MayaWindow")) {
  234.         string $label = "About Maya...";
  235.         string $annotation = "About Maya: Displays version number and other product information for Maya";
  236.         if (`about -evalVersion`)
  237.         {
  238.             $label = "About Maya Personal Learning Edition...";
  239.             $annotation = "About Maya Personal Learning Edition: Displays version number and other product information for Maya Personal Learning Edition";
  240.         }            
  241.         menuItem -divider true; 
  242.         menuItem -label $label
  243.             -annotation $annotation
  244.             -image "menuIconHelp.xpm"
  245.             -enableCommandRepeat false
  246.             -command "ProductInformation";
  247.     }
  248. }    
  249.